package org.toycode.logindemo.entity;

import java.io.Serializable;
import javax.persistence.Entity;

/**
 * Task entity.
 *
 * @author <a href="mailto:DL88250@gmail.com">Liang Ding</a>
 * @version 1.0.0.1, Sep 1, 2009
 */
@Entity
public class Task extends AbstractDataTable implements Serializable {

    /**
     * generated default serial version id.
     */
    private static final long serialVersionUID = 1L;
    /**
     * owner of this task.
     */
    private String owner;
    /**
     * description of this task.
     */
    private String description;
    /**
     * progress description of this task.
     */
    private String progressDescription;

    /**
     * Gets the progress description of this task.
     *
     * @return the progress description of this task
     */
    public String getProgressDescription() {
        return progressDescription;
    }

    /**
     * Sets the progress description of this task.
     *
     * @param progressDescription new value of the progress description of
     * this task
     */
    public void setProgressDescription(String progressDescription) {
        this.progressDescription = progressDescription;
    }

    /**
     * Gets the description of this task.
     *
     * @return the description of this task
     */
    public String getDescription() {
        return description;
    }

    /**
     * Sets the description of this task.
     *
     * @param description new value of the description of this task
     */
    public void setDescription(final String description) {
        this.description = description;
    }

    /**
     * Gets the owner of this task.
     *
     * @return the owner of this task
     */
    public String getOwner() {
        return owner;
    }

    /**
     * Sets the owner of this task.
     *
     * @param owner new value of the owner of this task
     */
    public void setOwner(final String owner) {
        this.owner = owner;
    }

    /**
     * {@inheritDoc}
     */
    @Override
    public int hashCode() {
        int hash = 0;
        hash += (id != null ? id.hashCode() : 0);
        return hash;
    }

    /**
     * {@inheritDoc}
     */
    @Override
    public boolean equals(final Object obj) {
        if (!(obj instanceof Task)) {
            return false;
        }
        Task other = (Task) obj;
        if ((this.id == null && other.id != null) ||
            (this.id != null && !this.id.equals(other.id))) {
            return false;
        }
        return true;
    }
}
